#include <iostream>
#include <chrono>
#include <sstream>
#include <iomanip>
 
unsigned long long factorial(int n) {
    if (n < 0) return 0; // 阶乘只能用于非负整数
    unsigned long long result = 1;
    for (int i = 2; i <= n; ++i) {
        result *= i;
    }
    return result;
}
 
std::string CurrentTimeString()
{
    auto now = std::chrono::system_clock::now();
    std::time_t now_time = std::chrono::system_clock::to_time_t(now - std::chrono::hours(24));
    
    std::stringstream ss;
    ss << std::put_time(std::localtime(&now_time), "%Y-%m-%d %X");
    return ss.str();
}